Integrand size = 23, antiderivative size = 38 \[ \int \cot ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-(a-b)^2 x-\frac {a^2 \cot (e+f x)}{f}+\frac {b^2 \tan (e+f x)}{f} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3751, 472, 209} \[ \int \cot ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-\frac {a^2 \cot (e+f x)}{f}-x (a-b)^2+\frac {b^2 \tan (e+f x)}{f} \]
[In]
[Out]
Rule 209
Rule 472
Rule 3751
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (a+b x^2\right )^2}{x^2 \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \left (b^2+\frac {a^2}{x^2}-\frac {(a-b)^2}{1+x^2}\right ) \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {a^2 \cot (e+f x)}{f}+\frac {b^2 \tan (e+f x)}{f}-\frac {(a-b)^2 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -(a-b)^2 x-\frac {a^2 \cot (e+f x)}{f}+\frac {b^2 \tan (e+f x)}{f} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.11 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.74 \[ \int \cot ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=2 a b x-\frac {b^2 \arctan (\tan (e+f x))}{f}-\frac {a^2 \cot (e+f x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-\tan ^2(e+f x)\right )}{f}+\frac {b^2 \tan (e+f x)}{f} \]
[In]
[Out]
Time = 0.17 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00
method | result | size |
parallelrisch | \(\frac {-a^{2} \cot \left (f x +e \right )+b^{2} \tan \left (f x +e \right )-f x \left (a -b \right )^{2}}{f}\) | \(38\) |
derivativedivides | \(\frac {b^{2} \left (\tan \left (f x +e \right )-f x -e \right )+2 a b \left (f x +e \right )+a^{2} \left (-\cot \left (f x +e \right )-f x -e \right )}{f}\) | \(53\) |
default | \(\frac {b^{2} \left (\tan \left (f x +e \right )-f x -e \right )+2 a b \left (f x +e \right )+a^{2} \left (-\cot \left (f x +e \right )-f x -e \right )}{f}\) | \(53\) |
norman | \(\frac {\frac {b^{2} \tan \left (f x +e \right )^{2}}{f}+\left (-a^{2}+2 a b -b^{2}\right ) x \tan \left (f x +e \right )-\frac {a^{2}}{f}}{\tan \left (f x +e \right )}\) | \(57\) |
risch | \(-x \,a^{2}+2 x a b -x \,b^{2}-\frac {2 i \left (a^{2} {\mathrm e}^{2 i \left (f x +e \right )}-b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+a^{2}+b^{2}\right )}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}\) | \(85\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.32 \[ \int \cot ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-\frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} f x \tan \left (f x + e\right ) - b^{2} \tan \left (f x + e\right )^{2} + a^{2}}{f \tan \left (f x + e\right )} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 71 vs. \(2 (29) = 58\).
Time = 0.70 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.87 \[ \int \cot ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\begin {cases} \tilde {\infty } a^{2} x & \text {for}\: e = 0 \wedge f = 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right )^{2} \cot ^{2}{\left (e \right )} & \text {for}\: f = 0 \\\tilde {\infty } a^{2} x & \text {for}\: e = - f x \\- a^{2} x - \frac {a^{2}}{f \tan {\left (e + f x \right )}} + 2 a b x - b^{2} x + \frac {b^{2} \tan {\left (e + f x \right )}}{f} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.21 \[ \int \cot ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {b^{2} \tan \left (f x + e\right ) - {\left (a^{2} - 2 \, a b + b^{2}\right )} {\left (f x + e\right )} - \frac {a^{2}}{\tan \left (f x + e\right )}}{f} \]
[In]
[Out]
none
Time = 0.84 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.21 \[ \int \cot ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {b^{2} \tan \left (f x + e\right ) - {\left (a^{2} - 2 \, a b + b^{2}\right )} {\left (f x + e\right )} - \frac {a^{2}}{\tan \left (f x + e\right )}}{f} \]
[In]
[Out]
Time = 11.81 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.84 \[ \int \cot ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {b^2\,\mathrm {tan}\left (e+f\,x\right )}{f}-\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (e+f\,x\right )\,{\left (a-b\right )}^2}{a^2-2\,a\,b+b^2}\right )\,{\left (a-b\right )}^2}{f}-\frac {a^2}{f\,\mathrm {tan}\left (e+f\,x\right )} \]
[In]
[Out]